home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
prolog
/
ai.prl
/
opnprlg1.hqx
/
Open Prolog
/
External Predicates…
/
Sources
/
prlxDefinitions.p
< prev
next >
Wrap
Text File
|
1993-04-15
|
7KB
|
251 lines
UNIT prlxDefinitions;
INTERFACE
CONST
{outcome codes, based on ISO error conditions and a few more╔}
noErrorSucceed = 0;
noErrorFail = 1;
systemError = 2;
calculationError = 3;
databaseError = 4;
evaluationError = 5;
implementationError = 6;
instantiationError = 7;
ioControlError = 8;
ioEndOfFileError = 9;
ioFormattingError = 10;
operatorError = 11;
overflowError = 12;
unclassifiedError = 13; {this is not part of the ISO definition}
syntaxError = 14;
typeError = 15;
undefinedPredicateError = 16;
undefinedValueError = 17;
underflowError = 18;
zeroDivideError = 19;
domainError = 20;
userInterrupt = 21; {this is not part of the ISO definition}
notAnErrorCode = - 1;
{tags}
variableTag = 0;
atomTag = 24;
integerTag = 32;
structureTag = 40;
realTag = 52;
{commands}
getPRLXInfo = 1;
initialisePredicate = 2;
callPredicate = 3;
closePredicate = 4;
getEventsVersion = 5;
{callback commands}
getTermInfo = 1;
getSubTerm = 2;
newTerm = 3;
unifyTerms = 4;
unifyToFunctor = 5;
unifyToInteger = 6;
identicalTerms = 7;
listArgumentToString = 8;
stringToListArgument = 9;
writeError = 10;
writeString = 11;
writelnString = 12;
drawALRT = 13;
pushDisplayString = 14;
popDisplayString = 15;
getEventRecord = 16;
doMyModalDialog = 17;
sendEvents = 18; {ask Open Prolog to send raw events}
inForeground = 19; {put 1 in callbackdata[1] if in foreground mode?}
startNotification = 20; {put up a notification}
stopNotification = 21;
getFreeTerm = 22; {get the index number of a new unbound local variable in
callbackdata[1]}
getPredicateNameAndArity = 23;
eventsVersion = 4;
eventRePositioned = 1;
eventGoAwayMouse = 2;
eventUpdate = 3;
eventActivate = 4;
eventDeactivate = 5;
eventMenuClick = 6;
eventMenuSelect = 7;
eventMenuKey = 8;
eventKey = 9;
eventSelect = 10;
eventClose = 11;
eventSave = 12;
eventSaveAs = 13;
eventQuit = 14;
eventShutdown = 15;
eventRestart = 16;
eventRevert = 17;
eventCalculateMenus = 18;
eventDisplayChar = 19;
eventDisplayText = 20;
eventDisplayFlush = 21;
eventDisplaySelection = 22;
eventContentClick = 23;
eventReadTerm = 24;
eventInitialise = 25;
eventSee = 26;
eventTell = 27;
eventSeeing = 28;
eventTelling = 29;
eventSeen = 30;
eventTold = 31;
eventGetCursorInfo = 32;
eventIdle = 33;
eventSuspend = 34;
eventResume = 35;
eventCloseAll = 36;
eventStartup = 37;
eventKissByeBye = 38;
eventGetEntry = 39;
eventItemHit = 40;
eventFindString = 41;
eventReplaceString = 42;
eventGetGrowLimit = 43;
eventSetWindowSize = 44;
eventWindowCommand = 45;
debugStepped = 46;
debugStep = 47;
wcGetNumber = 1;
wcGetWindow = 2;
wcGetSelection = 3;
wcSetSelection = 4;
wcSetOutline = 5;
wcClearOutline = 6;
wcClearAllOutlines = 7;
wcSetAsOutput = 8;
wcGetIndex = 9;
wcGetStartingPoint = 10;
wcSetStartingPoint = 11;
wcPurgeInput = 12;
wcOpenFileWindow = 13;
messageOK = 0;
messageQuit = 1;
messageReset = 2;
messageExecute = 3;
messageFail = 4;
messageKey = 5;
messageClick = 6;
messageShutdown = 7;
messageRestart = 8;
messageInterrupt = 9;
messageEntry = 10;
messageCancel = 11;
messageNoReply = 12;
messageError = - 32768;
rtOK = 0;
rtError = - 32768;
rtIncomplete = - 32767;
rtNumberRangeError = - 32766;
rtQuotedAtomTooLong = - 32765;
rtStringTooLong = - 32764;
rtAtomTooLong = - 32763;
rtVariableNameTooLong = - 32762;
rtUnexpectedEOF = - 32761;
rtUnexpectedCharacter = - 32760;
rtUnificationFailure = - 32759;
rtOperatorError = - 32758;
rtCantFindFile = - 32757;
rtFileIsAFolder = - 32756;
rtFileIsWrongTypeForReading = - 32755;
rtFileIsAlreadyOpen = - 32754;
rtDiskIsFull = - 32753;
rtDiskIsLocked = - 32752;
rtFileIsLocked = - 32751;
rtFileIsReadOnly = - 32750;
rtFileIOProblem = - 32749;
rtCantGetEnoughMemory = - 32748;
rtAttemptToReadPastEof = - 32747;
rtSpaceError = - 32746;
rtBufferTooSmall = - 32745;
rtNonSequentialFileAccess = - 32744;
rtCantOpenForReading = - 32743;
rtCantOpenForWriting = - 32742;
rtFileTableFull = - 32741;
rtFileIsWrongTypeForWriting = - 32740;
rtDirectoryNotFound = - 32739;
rtFileAlreadyExists = - 32738;
rtNoSuchVolume = - 32737;
rtOutputStringTooBig = - 32736;
appleMenu = 128;
fileMenu = 129;
editMenu = 130;
findMenu = 131;
windowMenu = 132;
fontMenu = 133;
sizeMenu = 134;
controlMenu = 135;
newItem = 1;
openItem = 2;
closeItem = 4;
saveItem = 5;
saveAsItem = 6;
revertItem = 7;
pageSetupItem = 8;
printItem = 9;
printSelectionItem = 10;
quitItem = 12;
undoItem = 1;
cutItem = 3;
copyItem = 4;
pasteItem = 5;
clearItem = 6;
selectAllItem = 8;
autoIndentItem = 10;
replaceDialogId = 132;
findDialogId = 133;
findItem = 1;
findSameItem = 2;
findSelectionItem = 3;
displaySelectionItem = 4;
replaceItem = 6;
replaceSelectionItem = 7;
TYPE
prlxRecord = RECORD
request, id: integer;
data: ARRAY [1..3] OF longint;
callbackRequest: integer;
callbackData: ARRAY [1..3] OF longint;
s: str255;
entryPoint: procPtr;
successful: boolean;
determinate: boolean;
outcome: integer;
permanentData: longint;
callbackAvailable: boolean;
prlxHandleFlags: signedByte;
prlxHandle: ^procPtr;
prlxFunctor: longint; {private - reserved}
END;
prlxPtr = ^prlxRecord;
TYPE
termIndex = 0..8192;
PROCEDURE callback(address: procPtr);
INLINE $205F, $4E90;
IMPLEMENTATION
END.